package com.lm.deeplearning4j.controller;

import com.lm.deeplearning4j.service.PredictService;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/predict")
public class PredictController {

    private final PredictService predictService;

    public PredictController(PredictService predictService) {
        this.predictService = predictService;
    }

    @PostMapping
    public String predict(@RequestBody double[] features) {
        return predictService.predict(features);
    }
}
